import { Component, OnInit } from '@angular/core';
import {ResultList} from '../result-list';
import {RequestMapping} from '../request.mapping';
import {HttpClient} from '@angular/common/http';
@Component({
  selector: 'app-log',
  templateUrl: './log.component.html',
  styleUrls: ['./log.component.css']
})
export class LogComponent implements OnInit {
  isCollapsed = false;
  page: any;

  _dataSet = [];
  _allChecked = false;
  _indeterminate = false;
  constructor(private http:HttpClient) { }

  ngOnInit() {
    this.loadData();
  }

  private loadData() {
    this.http.get<ResultList>(RequestMapping.LOGS).subscribe(response => {
      this._dataSet = response.data;
    })
  }

}
